import word2vec as W2V
import os
laptop_dir = '../DataSet/Aspect-Sentiment-Analysis-master/laptop_data/'
restaurant_dir = '../DataSet/Aspect-Sentiment-Analysis-master/restaurant_data/'
laptop_corpus = laptop_dir + 'train_text_token.txt'
restaurant_corpus = restaurant_dir + 'train_text_token.txt'
laptop_lookup_table = laptop_dir + 'lookup_table.bin'
restaurant_lookup_table = restaurant_dir + 'lookup_table.bin'
# get the word embeddings of laptop_training_data
if (os.path.exists(laptop_lookup_table)):
    laptop_model = W2V.load(laptop_lookup_table)
else:
    W2V.word2vec(laptop_corpus, laptop_lookup_table, size=300, verbose=True)
    laptop_model = W2V.load(laptop_lookup_table)
# get the word embeddings of restaurant_training_data
if (os.path.exists(restaurant_lookup_table)):
    restaurant_model = W2V.load(restaurant_lookup_table)
else:
    W2V.word2vec(restaurant_corpus, restaurant_lookup_table, size = 300, verbose=True)
    restaurant_model = W2V.load(restaurant_lookup_table)

